package test01;

import java.util.concurrent.TimeUnit;

public class demo6 {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread (()->{
               for (int i=0;i<5;i++){
                   //不执行
               }
        });

        System.out.println("开始前线程状态:"+thread.getState());
        System.out.println(thread.isAlive());
        thread.start();
        System.out.println("开始前线程状态:"+thread.getState());
        System.out.println(thread.isAlive());
        thread.join();
        System.out.println("开始前线程状态:"+thread.getState());
        System.out.println(thread.isAlive());
    }
}
